using Avalonia.Controls;
using Avalonia.Interactivity;
using System.Threading.Tasks;

namespace IntegratedMeasuring.Pages;

public partial class SaveAsDialog : Window
{
    public string? InputName { get; private set; }
    public string? InputRemarks { get; private set; }

    public SaveAsDialog(string? defaultName = null, string? defaultRemarks = null)
    {
        InitializeComponent();
        NameTextBox.Text = defaultName ?? string.Empty;
        RemarksTextBox.Text = defaultRemarks ?? string.Empty;
    }

    private void OkButton_Click(object? sender, RoutedEventArgs e)
    {
        InputName = NameTextBox.Text;
        InputRemarks = RemarksTextBox.Text;
        this.Close(true);
    }

    private void CancelButton_Click(object? sender, RoutedEventArgs e)
    {
        this.Close(false);
    }
} 